import os
import uvicorn
from application import create_app, FastAPI


app: FastAPI = create_app()


@app.get('/api')
async def api() -> dict:
    """
    测试接口
    :return:
    """
    return {'title': f'{os.environ.get("APP_NAME")}测试接口'}




if __name__ == '__main__':
    uvicorn.run(
        'main:app',
        host=os.environ.get('APP_HOST'),
        port=int(os.environ.get('APP_PORT')),
        reload=True
    )